home *** CD-ROM | disk | FTP | other *** search
-
-
- Micro Statistics Package
-
- MSP
- Version 2.0
-
- Elmo Keller
- 1414 Smith Court
- San Luis Obispo, CA. 93401
-
- Patrick Marsh
- 10482 Orozco Road
- San Diego, CA 92124
-
- 1.0 INTRODUCTION
-
- è1.Introduction
- The Micro Statistics Package is a statistics utility program written in
- Turbo Pascal for an IBM PC, XT, AT or compatible computer based on MSDOS.
-
- The salient feature of this package is its ease of use. It allows the user
- to perform a wide variety of statistical analyses on columns of data contained
- in a worksheet. The user manipulates data in a typical statistical worksheet
- by typing in English commands indicating actions to be taken on the column or
- columns of data. There are over 100 commands, including procedures for
- regression, analysis of variance, correlation, Chisquare analysis of count
- data, plotting, sorting, transforming data, stem and leaf displays, boxplots,
- nonparametric statistics, cross tabulation, save and retrieval of files,
- letter value displays, condensed plots, pop up reverse Polish Calculator with
- combinations and permutations and over 25 functions, pop up distribution
- calculator to compute Normal, t, F and Chisquare distribution P values and
- help commands. Commands are also provided to edit data contained in the
- worksheet. This package is intended to be used by students and researchers
- dealing with small or medium size data analysis problems. The second major
- feature of MSP is its environment of pop up windows. There are 8 windows that
- can be activated by function keys. F2 activates the calendar and time of day
- window. F3 turns the screen into a reverse Polish Calculator. F4 activates
- the distribution calculator. F1, F7 and F8 are general purpose windows and can
- store results for later comparison. These windows are activated by the
- function keys and deactivated by the same function keys. F5 and F6 are small
- windows used for holding the current path, or help information for each cmd.
- In addition there are a series of file utility commands to make data operations
- easier, such as getdir,listfile, changedir, makedir, removedir and delete file.
-
-
- MSP has a HELP feature. From within the MSP program the command help will
- invoke the list of available commands. The command HELP COMMAND will invoke
- specific help for the command following HELP.
-
- MSP>help
-
- will generate the list of available MSP commands.
-
- MSP> help stem
-
- will generate help information for the stem command.
-
- A command can be up to 8 characters long. One needs to give the command with
- the minimum number of characters to uniquely identify the command. For
- example help can be given by he, hel or help to activate the command.
-
-
- 2.0 GETTING STARTED
-
- The list below shows the names of the files that are needed on the disk to
- run MSP.
-
- MSP.COM MSP.H04 MSP.H09
- MSP.000 MSP.H05 MSP.H10
- MSP.H01 MSP.H06 RPCALC.BIN
- MSP.H02 MSP.H07
- MSP.H03 MSP.H08
-
- MSP.COM is the main module and is the root overlay for the MSP package. The
- overlay modules are in MSP.000 which contain the routines called by main,
- and must be on the same disk as the main module. The files MSP.H01 - MSP.H10
- are help files containing the text used in the HELP command. The file RPCALC.BIN
- èthe same disk as the main module. Your disk may also contain data files for
- is used to form the screen image of the Reverse Polish Calculator.
-
- Insert the disk in a drive and type MSP. The program initializes the data
- structures and then prints a screen message. The screen message stays in the
- main window until the main window is used for output. You will see the MSP
- prompt in the command window. You can now enter the MSP commands. Notice the
- header in the command window displays the windows that can be invoked by
- the function keys.
-
- Now you are ready to enter the MSP command in the command window.
-
- 3.0 CHECKING OUT THE WINDOWS
-
- F1 is displayed on the main window which is active when you begin. Press
- the function key F2 and the calendar and clock become active in a small
- window. Again toggle the function key F2 and the calendar window becomes
- inactive and back to the main window. Next try the function key F3. This
- invokes the calculator. This is a Reverse Polish Calculator and operates
- with values on a stack. More is said about this calculator in the manual,
- for now enter 24 on the keyboard and the enter key. Then enter 6 and the
- + key, 30 will be displayed. When the calculator is active the function keys
- take on the functions as displayed on the left side of the screen. With 30
- in the display, press F1 and the square root of 30 will be displayed. Note
- that the functions above the left display of the function keys are activated
- by shift and the appropriate function key. The ESC key deactivates the
- calculator and you are now back to the background window. Press F4 and the
- F4 Distribution Functions Window is activated. Choose the t distribution
- by selecting 2. Enter a t value and degrees of freedom, say 2.3 and 15.
- The significiance levels will be displayed. Next choose 5 and deactivate
- the Distributions Window. F7-F10 are available for the user to use to
- create windows for their own use.
-
- 4.0 MSP SUMMARY
-
- è3. Overview
- The Micro Statistical Package, MSP, is an integrated system consisting of a
- command line interpreter and a set of statistical procedures together with many
- utility routines. Together they are used to perform analyses and housekeeping
- functions on real data stored in a worksheet. MSP contains procedures
- to do the following functions: (Upper case is used here to indicate the key
- part of the command. Command lines can be a mixture of upper or lower case)
-
- * The READ, SET, SAVE, and RETRieve commands are used to input and save
- data. Input data can be entered from the console or from an existing
- data file created with an editor. The PRINt command is used to print
- data to the screen or to the printer or to a file. The complete
- worksheet can be saved on a disk file and later retrieved.
-
- * The ORDEr and SORT commands are provided to allow the sorting of
- column data into increasing order, and/or carry along corresponding
- columns. RANK computes the ranks of data in a column.
-
- * AVERage, STANdard deviation, COUNt, MEDIan, MAXImum, MINImum, PLOT,
- NSCOres, HISTogram, and DESCribe are some of the commands which
- provide descriptive statistics for data in the worksheet columns.
-
- * There are over 24 commands to provide transformations on data in the
- worksheet. A LET command allows columns of data to be terms or
- factors in mathematical expressions.
-
- * Editing commands such as APPEnd, INSErt, PICK, SUBStitute, etc. can
- be used to edit data contained in the worksheet.
-
- * A directory command, DIR, is used to obtain the directory listing of
- files on any disk.
-
- * Commands are provided for statistical analysis of data. These
- commands include, ZTESt, TTESt, TWOSample, POOLed t test, ONEWay,
- TWOWay, REGRession, CHISquare, CORRelation, and the general linear
- model methodology using repeated regression runs.
-
- * A window invironment is provided with pop up calculator, distribution
- functions, calendar and clock.
-
- * A HELP command to describe usage of all commands.
-
- The software is written in Turbo Pascal marketed by Borland International.
-
- The Program modules consist of two main parts:
-
- 1. Data structures and procedures necessary to supply the user with a
- worksheet of 35 columns, containing up to a total of 2500 real values.
-
- ( See figure 1. below )
-
- 2. A collection of commands which operate on the data stored in the
- worksheet. These commands are English and the verb is descriptive
- of the operation performed on the column or columns.
-
- è
-
- COLUMNS
-
- C1 C2 C3 ... C23 C24 C35 MCOLS
- --------------------------------------------------
- ROW | |
- | |
- 1 | |
- | |
- 2 | |
- | |
- 3 | |
- | |
- . | |
- . | |
- . | |
- | |
- MROWS | |
- --------------------------------------------------
-
-
- Figure 1. The MSP Worksheet
-
-
- EXAMPLE 1. is a simple example of commands to MSP to demonstrate the use of
- commands on columns in the worksheet. Output from MSP goes into the active
- window, or to the printer or to a file depending on the command OUTPUT which
- sets the destination for the output. The default in to the screen in the
- currently active window.
-
-
- MSP> SET DATA IN C1 DATA GOES IN COLUMN WISE
- DATA>1 2 3 4 5 6 7 8 9 10 SPACE or COMMA DELIMITS DATA VALUES
- DATA>END END -- ENDS INPUT DATA
- MSP> AVERAGE DATA IN C1 AVERAGE COMMAND
- MSP> READ DATA INTO C2-C4 DATA GOES ROW WISE INTO C2 C3 C4
- DATA> 40 35 60
- DATA> 50 60 38
- DATA>END
- MSP> PRINT C2-C4
- MSP> HISTOGRAM DATA IN C1
- MSP> STOP
-
- EXAMPLE 1. MSP Sample Commands
-
- The MSP command line interpreter allows free formatted command lines for
- commands. Extraneous characters are allowed in the command line to give added
- documentation, but are completely ignored by the program as long as the
- necessary arguments appear in the correct order and are of the correct type.
- Command lines can be up to 128 characters. The command line consists of a
- command word (enough characters to uniquely identify the command) followed
- by an argument list. The command line takes the following forms.
-
- è command
-
- command arg1 arg2 ... argn
-
- command "arg1"
-
-
-
- where arg is either a column, filename enclosed in quotes, or a real valued
- constant separated by either blanks,tabs, or commas.
-
- Only the first eight letters of a command are used to determine the uniqueness
- of the verb. You may give as many characters of a command as you wish, so
- long as it is uniquely identified from the available commands. The backspace
- key allows you to back up and retype a command or argument. The key
- combination of CTRL and e pressed together will erase the command line and
- allow you to retype the command. This is what one would do in response to a
- beep indicating an error in the command line.
-
- Output to the console can be routed to the printer by using the
- command,
-
- MSP> OUTPUT "prn" or to a disk file by the following command,
- MSP> OUTPUT "file".
-
- Output will go back to the console by using the command,
-
- MSP> NOOUT
-
- This will close the channel to the disk file or printer and redirect output
- to the currently active window on the console screen. Be sure that the
- printer is ready for operation before enabling printing. Output results can
- be sent to a file for later output to the printer. This is useful when the
- user is in an environment where the printer is shared.
-
- 5.0 SUMMARY OF VALID ARGUMENTS
-
- Constant, column, or name arguments may appear in the argument list of a
- command. Constant values are read in as real, and if an integer value is
- expected the value is truncated. A column argument may take two possible
- forms. It may be the letter c followed by an integer in the range 1 to 35, or
- it may be a column name of the form 'cost' or "cost". Arguments are delimited
- by a comma, tab, or a blank.
-
- average the data in c1 put it in c2
- set "data.one" in c3
-
-
- 1. The letter c, or C, followed by an integer within the range 1 to 35.
-
- 2. A column name consisting of up to 10 characters enclosed in either
- single or double quotes. A column can be given a name by using the
- NAME command.
-
- 3. A column range is two column arguments separated by a dash. For
- example, the argument c1-c5 means column 1 through column 5.
-
- For commands requiring file access, the file name is specified as
- "filename". In the READ and SET commands the file name must be given in
- the command line as one of the arguments, as also in SAVE and RETRieve.
- If the user is prompted for the file name, the file name is typed without
- enclosing quotes.
-
- The following notation will be used in these notes when referring to
- arguments and also in the online documentation.
-
- [ ] : denotes optional information.
-
- C : denotes a column (e.g. c1).
-
- K : denotes an integer or real constant (e.g. 23 or 34.43).
-
- C(K): denotes a real constant equal to the value in the Kth row of
- column C.
-
- E : denotes either a constant or a column. (e.g. 3.5 or c4)
-
- "name" : denotes a column name. This name can be up to 10 characters
- in length.
-
- Ci-Cj : denotes a column range. If a valid range, all columns with
-
- the specified range will be used (e.g. C3 - C10, "coeff" - C6).
-
- C ... C : denotes a general column list. Each column, or column
- range, is specified in the list, separated by blanks or commas, using
- any of the above mentioned column argument forms (e.g. C2, C4
- "code", c1 - c4).
-
- "drive_char:filename.extension" : The file name consists of up to 15
- characters which includes:
-
- drive_char: - The drive character must represent a valid drive
- on the system. If not specified, the currently logged drive is
- used.
-
- filename - The filename must be a valid MSDOS file name.
-
- .extension - The file extension (type) must be a valid
- MSDOS file extension.
-
- It is possible to create text files containing standard MSP commands
- and execute them from within MSP as a batch file. The command file can
- be created using any editor follow the same command format as when entered at
- the MSP prompt. There are a few things to be careful of when using MSP
- command files:
-
- - Be sure that each line is terminated with a carriage return.
-
- - When entering data for the READ or SET commands, be sure to use the
- END command to terminate the data. Also, be sure that the line
- containing the END command is terminated with a carriage return.
-
- - Be sure data is entered for all prompts. Several commands prompt for
- extra information and this information must be provided in a command file.
-
- Assume the data below is in a file called one.xxx :
-
- è
- READ C1 C4 C6
- 1.23 3.45 3.54 =========> data in a file one.xxx
- 2.34 3.65 76.5
- END
- PRINT C1 C4 C6
-
-
- To execute the commands in the file you would give the following
- command in MSP.
-
- MSP> execute "one.xxx"